<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*body,ul,li{
            margin: 0;
            padding: 0;
        }

         */

        ul {
            list-style-type: none;
            overflow: hidden;
            background-color: rosybrown;
            height: 30px;
        }

        li a {
            text-decoration: none;
        }

        ul > li {
            float: left;
            width: 25%;
            height: auto;
            text-align: center;
            line-height: 25px;
        }

        ul > li:hover {
            background-color: #2e6da4;
            color: #3c3c3c;
        }
    </style>
</head>

<body>
<h1>导航条</h1>
<div>
    <li>
        <ul>
            <li><a href="">手机</a></li>
            <li><a href="">小米</a></li>
            <li><a href="">魅族</a></li>
            <li><a href="">apple</a></li>
        </ul>
    </li>
</div>
</html>


